package com.example.lotterysystem.controller.param;

import lombok.Data;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_yizYa
 * Date: 2025/8/8
 * Time: 22:55
 */
@Data
public class PageParam implements Serializable {
    /**
     * 当前页: 默认第一页
     */
    private Integer currentPage = 1;

    /**
     * 当前页数据数量，默认为 10
     */
    private Integer pageSize = 10;

    /**
     * 获取偏移量
     *
     * @return
     */
    public Integer offset() {
        return (currentPage - 1) * pageSize;
    }
}
